<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首界面</title>
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../Public/register/js/My97DatePicker/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
 function selectitem(index){
   switch(index){
    case 1:
    window.location.href="{:U('Upload/uploadpicture')}"
    break;
    case 2:
    window.location.href="{:U('Note/addBlog')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 7:
    window.location.href="{:U('Timeshow/Index')}"
    break;
   }
}
function toChild(uid)
{
  var url = 'getChild/uid/'+uid;
  window.location.href = "{:U('"+url+"')}";
}
function changerole(){
	$('#role img').attr('src',$('#select_r').attr('value'));
}
function toAddChild()
{
    var name=$("#name").val();
    var netweb=$("#netweb").val();
    var password=$("#password").val();
    var birthday=$("#birthday").val();
    var realBirthday=new Date(birthday);
    var lastbirthday=realBirthday.getTime();
    var sex=$("#sex").val();
   alert(sex);
   $.post("doAddChild",{name:name,netweb:netweb,password:password,birthday:lastbirthday,sex:sex},function(data){  
        var jsonObj = $.parseJSON(data);
        if(jsonObj.status==1){
         window.location.href = "tohome";
         }
         else{
         //创建失败，刷新本页面
         alert("添加失败，请重新输入！");
         window.location.href = "toAddChild";
         }
     });
}

</script>
<style>

div{
	margin:0px;
	margin-left:auto;
	margin-right:auto;
	/*border:solid ;
	border-color:#Ff0000;*/
	}
body {
	height:298px;
	background:#ffffff;
    clear:both;
    margin:0px;	
	margin-left:2%;
}
a {
	text-decoration: none;
	color:#036e6c;
	
	font-size:9pt;
}
input{
	background:#f2fbfe;
	}
#manager_title{
	background:url(../Public/maincontent1/image/manager.png) no-repeat left center;
	width:98%;
	margin-left:2%;
	height:16px;
	}	
.acbu{
	margin-left:3%;
	margin-top:8px;
	height:80%;
	width:50px;
	float:left;
    background:center center no-repeat;
    cursor:pointer;
	}
.record{
	width:98%;
	height:40px;
	float:left;
	}	
.record div{
	margin-left:3%;
	}
.upd{
	color:#D0D0D0;
	font-style:oblique;
	height:40px;
	float:left;
	line-height:40px;
	}
.ce{
	width:70%;
	}	
.ti{
	width:23%;
	} 
 #create_button{
	background:url(../image/create.png);
	width:104px;
	height:39px;
	cursor:pointer;
} 
.myfontstyle{
    font-family:'黑体';
    letter-spacing: 3px;
} 	
</style>

</head>

<body>
<div style="width:100%;height:100%;">
<div id='main' style="float:left;width:67%;height:100%;">
     <table border="0" cellspacing="12px" cellpadding="0" style="text-align:left; color:#209593; font-size:10pt; font-weight:bold; ">
  
 
  <tr>
    <td style='padding-left:20px;'>孩的名字：<br />
      <input type="text" name="name" id="name" style="width:300px;" /></td>
  </tr>
  <tr>
    <td style='padding-left:20px;' >用&nbsp;户&nbsp;名：<br />
      <input type="text" name="netweb" id="netweb" style="width:300px;"/>.tang.com </td>
  </tr>
  <tr>
    <td style='padding-left:20px;'>密&emsp;&emsp;码：<br/>
      <input type="password" name="password" id="password" style="width:300px;"/></td>
  </tr>
  <tr>
    <td style='padding-left:20px;'>生&emsp;&emsp;日：<br />
      <input type="birthday" name="birthday" id="birthday" style="width:300px;" onfocus="WdatePicker({isShowClear:false,readOnly:true,dateFmt:'MM/dd/yyyy HH:mm:ss'})"/>
      <img onclick="WdatePicker({el:'birthday',isShowClear:false,readOnly:true,dateFmt:'MM/dd/yyyy HH:mm:ss'})" src="../Public/child/image/cal.gif"  align="absmiddle">
      </td>
  </tr>
  <tr>
    <td style='padding-left:20px;'>性&emsp;&emsp;别：<br />
      <select name="sex">
        <option selected value="1" id="sex">男</option>
        <option value="0" >女</option>s
        </select></td>
  </tr>
   <tr>
     <td></td>
   </tr>
   <tr>
       	<td>
           	<div id='create_button' style="background: url(../Public/register/image/create.png);" onclick="toAddChild()" ></div>
         </td>
  </tr>
</table>
</div>
<div style="float:left;width:6%;background:url(../Public/maincontent1/image/m_line.png) no-repeat right center;height:266px; "></div>
<div style="float:left;width:27%;margin-top:30px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div style="width:170px;height:185px"><img src="../Public/upload/head/{$parent.picture}" style="width:170px;height:185px;" /></div></td>
  </tr>
  <tr>
    <td ><div  style="background:url(../Public/maincontent1/image/v_line.png) bottom left repeat-x;width:180px;height:27px;"></div></td>
  </tr>
  
  <tr>

</table>
</div>
</div> 
<img src="../Public/maincontent1/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />
</body>
</html>
